//package com.gfxy.config;
//
//import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
//import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
//import org.apache.ibatis.session.SqlSessionFactory;
//import org.mybatis.spring.annotation.MapperScan;
//import org.springframework.beans.factory.annotation.Qualifier;
//import org.springframework.boot.context.properties.ConfigurationProperties;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//import javax.sql.DataSource;
//
///**
// * @author: lijixin 2021/6/9 9:44 上午
// */
//@Configuration
////@MapperScan(basePackages = "com.gfxy.modules.dbcenter.**.mapper*",sqlSessionFactoryRef = "dbCenterSqlSessionFactory")
//public class DbCenterMybatisPlusConfig {
////    @Bean(name = "db-center")
////    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.db-center" )
////    public DataSource dbCenter () {
////        return DruidDataSourceBuilder.create().build();
////    }
////
////    @Bean(name = "dbCenterSqlSessionFactory")
////    public SqlSessionFactory sqlSessionFactory(@Qualifier("db-center") DataSource dataSource) throws Exception {
////        MybatisSqlSessionFactoryBean sessionFactoryBean = new MybatisSqlSessionFactoryBean();
////        sessionFactoryBean.setDataSource(dataSource);
////
////        return sessionFactoryBean.getObject();
////    }
//}
